import { createRouter, createWebHistory } from "vue-router";
import login from "../view/Login.vue";
import Portrait from "../view/user/Portrait.vue";
import register from "../view/Register.vue";
import Issue from "../view/parent/Issue.vue";

import home from "../view/tutor/Home.vue";

import Ordert from "../view/tutor/Order.vue";
import Cordt from "../view/tutor/Cord.vue";
import minet from "../view/tutor/Mine.vue";
import address from "../view/user/Address.vue";
import User from "../view/User.vue";

import RouterPage from "../view/RouterPage.vue";
import OrderDetail from "../view/tutor/order/OrderDetail.vue";
import IssueDetail from "../view/infoDetail/IssueDetail.vue";
import ApplayUserDetail from "../view/tutor/order/ApplayUserDetail.vue";
import { path } from "@tauri-apps/api";
import UserUpdate from "../view/user/userUpdate.vue";
import WorkList from "../view/tutor/order/WorkList.vue";
import RenWuList from "../view/tutor/order/RenWuList.vue";
import Password from "../view/Password.vue";
const routes = [
  {
    path: "/login",
    name: "login",
    component: login,
  },
  {
    path: "/register",
    name: "register",
    component: register,
  },
  {
    path: "/user",
    name: "user",
    component: User,
  },
  {
    path: "/issueDetail",
    name: "issueDetail",
    component: IssueDetail,
  },
  {
    path: "/",
    name: "indexPage",
    component: RouterPage,
  },
  {
    path: "/issue",
    name: "issue",
    component: Issue,
    children: [],
  },
  {
    path: "/ptt",
    name: "ptt",
    component: Portrait,
  },

  {
    path: "/minet",
    name: "minet",
    component: minet,
  },
  {
    path: "/tutor",
    name: "tutor",
    component: home,
    children: [
      // {
      //   path: "issuet",
      //   name: "issuet",
      //   component: Issuet,
      //   children: [
      //     {
      //       path: "fabu",
      //       name: "fabu",
      //       component: Issuep,
      //     },
      //   ],
      // },

      {
        path: "ordert",
        name: "ordert",
        component: Ordert,
      },
      {
        path: "cordt",
        name: "cordt",
        component: Cordt,
      },
    ],
  },
  {
    path: "/orderDetail",
    name: "orderDetail",
    component: OrderDetail,
  },
  {
    path: "/applayUserDetail",
    name: "ApplayUserDetail",
    component: ApplayUserDetail,
  },
  {
    path: "/address",
    name: "address",
    component: address,
  },
  {
    path: "/updateUser",
    name: "updateUser",
    component: UserUpdate,
  },
  {
    path: "/workList",
    name: "workList",
    component: WorkList,
  },
  {
    path: "/renwuList",
    name: "renwuList",
    component: RenWuList,
  },
  {
    path: '/updatePassword',
    name: 'updatePassword',
    component: Password
  }
];

const router = createRouter({
  history: createWebHistory("history"),
  routes,
});

export default router;
